/****************************************************************************
*			
*
* File      : bsp_driver_intvect.h
* Version   : V1.0
* By        : luofei
* Time		: 2013-01-17
* For       : ARMv7M Cortex-M3
* Mode      : Thumb2
* Toolchain : IAR EWARM
*******************************************************************************/
#ifndef BSP_DRIVER_INTVECT_H
#define BSP_DRIVER_INTVECT_H

#include "../stm32f103bsp_def.h"
/*
*********************************************************************************************************
*                                               DEFINES
*********************************************************************************************************
*/


typedef enum{

    stm32f103x_bsp_int_id_WWDG                    =               0 ,   /* Window WatchDog Interrupt                            */
    stm32f103x_bsp_int_id_PVD                     =               1 ,   /* PVD through EXTI Line detection Interrupt            */
    stm32f103x_bsp_int_id_TAMPER                  =               2 ,   /* Tamper Interrupt                                     */
    stm32f103x_bsp_int_id_RTC                     =               3 ,   /* RTC global Interrupt                                 */
    stm32f103x_bsp_int_id_FLASH                   =               4 ,   /* FLASH global Interrupt                               */
    stm32f103x_bsp_int_id_RCC                     =               5 ,   /* RCC global Interrupt                                 */
    stm32f103x_bsp_int_id_EXTI0                   =               6 ,   /* EXTI Line0 Interrupt                                 */
    stm32f103x_bsp_int_id_EXTI1                   =               7 ,   /* EXTI Line1 Interrupt                                 */
    stm32f103x_bsp_int_id_EXTI2                   =               8 ,   /* EXTI Line2 Interrupt                                 */
    stm32f103x_bsp_int_id_EXIT3                   =               9 ,   /* EXTI Line3 Interrupt                                 */
    stm32f103x_bsp_int_id_EXTI4                   =              10 ,   /* EXTI Line4 Interrupt                                 */
    stm32f103x_bsp_int_id_DMA1_CH1                =              11 ,   /* DMA1 Channel 1 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA1_CH2                =              12 ,   /* DMA1 Channel 2 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA1_CH3                =              13 ,   /* DMA1 Channel 3 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA1_CH4                =              14 ,   /* DMA1 Channel 4 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA1_CH5                =              15 ,   /* DMA1 Channel 5 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA1_CH6                =              16 ,   /* DMA1 Channel 6 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA1_CH7                =              17 ,   /* DMA1 Channel 7 global Interrupt                      */
    stm32f103x_bsp_int_id_ADC1_2                  =              18 ,   /* ADC1 et ADC2 global Interrupt                        */
    stm32f103x_bsp_int_id_USB_HP_CAN_TX           =              19 ,   /* USB High Priority or CAN TX Interrupts               */
    stm32f103x_bsp_int_id_USB_LP_CAN_RX0          =              20 ,   /* USB Low Priority or CAN RX0 Interrupts               */
    stm32f103x_bsp_int_id_CAN_RX1                 =              21 ,   /* CAN RX1 Interrupt                                    */
    stm32f103x_bsp_int_id_CAN_SCE                 =              22 ,   /* CAN SCE Interrupt                                    */
    stm32f103x_bsp_int_id_EXTI9_5                 =              23 ,   /* External Line[9:5] Interrupts                        */
    stm32f103x_bsp_int_id_TIM1_BRK                =              24 ,   /* TIM1 Break Interrupt                                 */
    stm32f103x_bsp_int_id_TIM1_UP                 =              25 ,   /* TIM1 Update Interrupt                                */
    stm32f103x_bsp_int_id_TIM1_TRG_COM            =              26 ,   /* TIM1 Trigger and Commutation Interrupt               */
    stm32f103x_bsp_int_id_TIM1_CC                 =              27 ,   /* TIM1 Capture Compare Interrupt                       */
    stm32f103x_bsp_int_id_TIM2                    =              28 ,   /* TIM2 global Interrupt                                */
    stm32f103x_bsp_int_id_TIM3                    =              29 ,   /* TIM3 global Interrupt                                */
    stm32f103x_bsp_int_id_TIM4                    =              30 ,   /* TIM4 global Interrupt                                */
    stm32f103x_bsp_int_id_I2C1_EV                 =              31 ,   /* I2C1 Event Interrupt                                 */
    stm32f103x_bsp_int_id_I2C1_ER                 =              32 ,   /* I2C1 Error Interrupt                                 */
    stm32f103x_bsp_int_id_I2C2_EV                 =              33 ,   /* I2C2 Event Interrupt                                 */
    stm32f103x_bsp_int_id_I2C2_ER                 =              34 ,   /* I2C2 Error Interrupt                                 */
    stm32f103x_bsp_int_id_SPI1                    =              35 ,   /* SPI1 global Interrupt                                */
    stm32f103x_bsp_int_id_SPI2                    =              36 ,   /* SPI2 global Interrupt                                */
    stm32f103x_bsp_int_id_USART1                  =              37 ,   /* USART1 global Interrupt                              */
    stm32f103x_bsp_int_id_USART2                  =              38 ,   /* USART2 global Interrupt                              */
    stm32f103x_bsp_int_id_USART3                  =              39 ,   /* USART3 global Interrupt                              */
    stm32f103x_bsp_int_id_EXTI15_10               =              40 ,   /* External Line[15:10] Interrupts                      */
    stm32f103x_bsp_int_id_RTCAlarm                =              41 ,   /* RTC Alarm through EXTI Line Interrupt                */
    stm32f103x_bsp_int_id_USBWakeUp               =              42 ,   /* USB WakeUp from suspend through EXTI Line Interrupt  */
    stm32f103x_bsp_int_id_TIM8_BRK                =              43 ,   /* TIM8 Break Interrupt                                 */
    stm32f103x_bsp_int_id_TIM8_UP                 =              44 ,   /* TIM8 Update Interrupt                                */
    stm32f103x_bsp_int_id_TIM8_TRG_COM            =              45 ,   /* TIM8 Trigger and Commutation Interrupt               */
    stm32f103x_bsp_int_id_TIM8_CC                 =              46 ,   /* TIM8 Capture Compare Interrupt                       */
    stm32f103x_bsp_int_id_ADC3                    =              47 ,   /* ADC3 global Interrupt                                */
    stm32f103x_bsp_int_id_FSMC                    =              48 ,   /* FSMC global Interrupt                                */
    stm32f103x_bsp_int_id_SDIO                    =              49 ,   /* SDIO global Interrupt                                */
    stm32f103x_bsp_int_id_TIM5                    =              50 ,   /* TIM5 global Interrupt                                */
    stm32f103x_bsp_int_id_SPI3                    =              51 ,   /* SPI3 global Interrupt                                */
    stm32f103x_bsp_int_id_UART4                   =              52 ,   /* UART4 global Interrupt                               */
    stm32f103x_bsp_int_id_UART5                   =              53 ,   /* UART5 global Interrupt                               */
    stm32f103x_bsp_int_id_TIM6                    =              54 ,   /* TIM6 global Interrupt                                */
    stm32f103x_bsp_int_id_TIM7                    =              55 ,   /* TIM7 global Interrupt                                */
    stm32f103x_bsp_int_id_DMA2_CH1                =              56 ,   /* DMA2 Channel 1 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA2_CH2                =              57 ,   /* DMA2 Channel 2 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA2_CH3                =              58 ,   /* DMA2 Channel 3 global Interrupt                      */
    stm32f103x_bsp_int_id_DMA2_CH4_5              =              59 ,   /* DMA2 Channel 4 and DMA2 Channel 5 global Interrupt   */                          

}e_stm32f103x_bsp_IntVetID;




/****************************************************                        
*				stm32f103x_bsp_init_IntVet
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_init_IntVet( void );
/****************************************************                        
*				set_bsp_driver_intvect
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
uint16_t stm32f103x_bsp_set_IntVet( e_stm32f103x_bsp_IntVetID u_ID,  
									CPU_FNCT_PARA			p_IsrFuc, 
									void				   *p_Data);

/****************************************************                        
*				stm32f103x_bsp_set_IntPara
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
uint16_t stm32f103x_bsp_set_IntPara( e_stm32f103x_bsp_IntVetID u_ID,
									void				   *p_Data);
/****************************************************                        
*				SYS_INT stm32f103x_bsp_clr_IntVet( )
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
uint16_t stm32f103x_bsp_clr_IntVet( e_stm32f103x_bsp_IntVetID u_ID );

void         stm32f103x_bsp_int_handler_WWDG          (void);
void         stm32f103x_bsp_int_handler_PVD           (void);
void         stm32f103x_bsp_int_handler_TAMPER        (void);
void         stm32f103x_bsp_int_handler_RTC           (void);
void         stm32f103x_bsp_int_handler_FLASH         (void);
void         stm32f103x_bsp_int_handler_RCC           (void);
void         stm32f103x_bsp_int_handler_EXTI0         (void);
void         stm32f103x_bsp_int_handler_EXTI1         (void);
void         stm32f103x_bsp_int_handler_EXTI2         (void);
void         stm32f103x_bsp_int_handler_EXTI3         (void);
void         stm32f103x_bsp_int_handler_EXTI4         (void);
void         stm32f103x_bsp_int_handler_DMA1_CH1      (void);
void         stm32f103x_bsp_int_handler_DMA1_CH2      (void);
void         stm32f103x_bsp_int_handler_DMA1_CH3      (void);
void         stm32f103x_bsp_int_handler_DMA1_CH4      (void);
void         stm32f103x_bsp_int_handler_DMA1_CH5      (void);

void         stm32f103x_bsp_int_handler_DMA1_CH6      (void);
void         stm32f103x_bsp_int_handler_DMA1_CH7      (void);
void         stm32f103x_bsp_int_handler_ADC1_2        (void);
void         stm32f103x_bsp_int_handler_USB_HP_CAN_TX (void);
void         stm32f103x_bsp_int_handler_USB_LP_CAN_RX0(void);
void         stm32f103x_bsp_int_handler_CAN_RX1       (void);
void         stm32f103x_bsp_int_handler_CAN_SCE       (void);
void         stm32f103x_bsp_int_handler_EXTI9_5       (void);
void         stm32f103x_bsp_int_handler_TIM1_BRK      (void);
void         stm32f103x_bsp_int_handler_TIM1_UP       (void);
void         stm32f103x_bsp_int_handler_TIM1_TRG_COM  (void);
void         stm32f103x_bsp_int_handler_TIM1_CC       (void);
void         stm32f103x_bsp_int_handler_TIM2          (void);
void         stm32f103x_bsp_int_handler_TIM3          (void);
void         stm32f103x_bsp_int_handler_TIM4          (void);
void         stm32f103x_bsp_int_handler_I2C1_EV       (void);

void         stm32f103x_bsp_int_handler_I2C1_ER       (void);
void         stm32f103x_bsp_int_handler_I2C2_EV       (void);
void         stm32f103x_bsp_int_handler_I2C2_ER       (void);
void         stm32f103x_bsp_int_handler_SPI1          (void);
void         stm32f103x_bsp_int_handler_SPI2          (void);
void         stm32f103x_bsp_int_handler_USART1        (void);
void         stm32f103x_bsp_int_handler_USART2        (void);
void         stm32f103x_bsp_int_handler_USART3        (void);
void         stm32f103x_bsp_int_handler_EXTI15_10     (void);
void         stm32f103x_bsp_int_handler_RTCAlarm      (void);
void         stm32f103x_bsp_int_handler_USBWakeUp     (void);

void         stm32f103x_bsp_int_handler_TIM8_BRK      (void);
void         stm32f103x_bsp_int_handler_TIM8_UP       (void);
void         stm32f103x_bsp_int_handler_TIM8_TRG_COM  (void);
void         stm32f103x_bsp_int_handler_TIM8_CC       (void);
void         stm32f103x_bsp_int_handler_ADC3          (void);
void         stm32f103x_bsp_int_handler_FSMC          (void);
void         stm32f103x_bsp_int_handler_SDIO          (void);
void         stm32f103x_bsp_int_handler_TIM5          (void);
void         stm32f103x_bsp_int_handler_SPI3          (void);
void         stm32f103x_bsp_int_handler_UART4         (void);
void         stm32f103x_bsp_int_handler_UART5         (void);
void         stm32f103x_bsp_int_handler_TIM6          (void);
void         stm32f103x_bsp_int_handler_TIM7          (void);
void         stm32f103x_bsp_int_handler_DMA2_CH1      (void);
void         stm32f103x_bsp_int_handler_DMA2_CH2      (void);
void         stm32f103x_bsp_int_handler_DMA2_CH3      (void);
void         stm32f103x_bsp_int_handler_DMA2_CH4_5    (void);


/****************************************************                        
*				stm32f103x_bsp_set_Uart1NVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_Uart1NVIC( void );


/****************************************************                        
*				stm32f103x_bsp_set_Uart3NVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_Uart3NVIC( void );

/****************************************************                        
*				stm32f103x_bsp_set_DMA5NVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_DMA5NVIC( void );

/****************************************************                        
*				stm32f103x_bsp_set_RTCNVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_RTCNVIC( void );

/****************************************************                        
*				stm32f103x_bsp_set_Timer1NVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_Timer1NVIC( void );

/****************************************************                        
*				stm32f103x_bsp_set_SPI2CC2500NVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_SPI2CC2500_Line1NVIC( uint8_t port, uint8_t pin );


/****************************************************                        
*				stm32f103x_bsp_set_SPI2CC2500NVIC
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_SPI3CC3000_Line1NVIC( void );



/****************************************************                        
*				stm32f103x_bsp_set_NVICConfig
* Description:	
* Arguments  :  
* Returns    :  
*****************************************************/
void stm32f103x_bsp_set_NVICConfig( IRQn_Type IRQn  );






#endif
